package sm.dam.api;

import java.util.List;
import java.util.Map;

public interface DDLAdaptor {

	public static final String RECORD_NUMBER = "RECORD_NUMBER";

	public static final String RECORD_KEY = "RECORD_KEY";

	public static final String NULLTABLE = "NULLTABLE";

	public String toSqlEntityName(String entityName);

	public String getRecordNumberType();

	public String getRecordKeyType();

	public boolean isSameType(String type1, String type2);

	public boolean isBigger(String type1, String type2);

	public boolean isBLob(String type);

	public boolean isCLob(String type);

	public String generateCreateTable(String tableName,
			Map<String, String> dbColumnNames);

	public String generateRenameTable(String oldTableName, String newTableName);

	public String generateRenameIndex(String oldIndexName, String newIndexName);

	public String generateDropTable(String tableName);

	public String generateCreateIndex(String indexName, boolean isUnique,
			String tableName, List<String> dbColumnNames);

	public String generateDropIndex(String indexName);

	public String generateModifyColumn(String tableName, String columnName,
			String dataType);

	public String generateAddColumn(String tableName, String columnName,
			String dataType);
}
